<!--
 * @Author: your name
 * @Date: 2020-08-22 01:51:42
 * @LastEditTime: 2020-08-27 20:30:23
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \exam-list\src\components\checkpaper\PaperDetail.vue
-->
<template>
  <div>
    <Card>
      <div v-if="examgetlistType.questions">
        <MarkdownPreview :initialValue="examgetlistType.questions[0].questions_stem" />
      </div>
      <div v-if="examgetlistType.questions">
        <MarkdownPreview :initialValue="examgetlistType.questions[0].questions_answer" />
      </div>
      <Button type="primary" @click="tiao">创建试卷</Button>
    </Card>
  </div>
</template>
<script>
import { mapActions, mapState } from 'vuex'
import { MarkdownPreview } from 'vue-meditor'
export default {
  data() {
    return {}
  },
  computed: {
    ...mapState('Exam', ['examgetlistType'])
  },
  methods: {
    ...mapActions('Exam', ['getNumList']),
    tiao() {
      this.$router.push({ path: '/home/exammanage/exam/list' })
    }
  },
  created() {
    this.getNumList()
  },
  components: {
    MarkdownPreview
  }
}
</script>

<style lang="scss" scoped>
button {
  margin-left: 43%;
}
</style>
